package cn.com.service;

import cn.com.dao.FoodBeanMapper;
import cn.com.pojo.CommentBean;
import cn.com.pojo.FoodBean;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FoodBeanServiceImpl implements FoodBeanService{
    @Resource
    private FoodBeanMapper foodBeanMapper;

    @Override
    public int countAll() {
        return foodBeanMapper.countAll();
    }

    @Override
    public FoodBean findAllById(Integer id) {
        return foodBeanMapper.findAllById(id);
    }
    @Override
    public FoodBean findPriceById(Integer id) {
        return foodBeanMapper.findPriceById(id);
    }

    @Override
    public List<FoodBean> findAll() {
        return foodBeanMapper.findAll();
    }

    @Override
    public CommentBean findCommentById(Integer id) {
        return foodBeanMapper.findCommentById(id);
    }

    @Override
    public int add(CommentBean comment) {
        return foodBeanMapper.add(comment);
    }


}
